package com.woniu.jifen.schedul;


import com.woniu.jifen.service.AUserCouponService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author 杜梅杰
 * @description 白名单初始化定时任务
 * @date 2024/5/8 19:09
 */
@Component
@Slf4j
public class CouPonScheduling {

@Autowired
private AUserCouponService userCouponService;

//@Scheduled(cron = "1 0 0 * * ?", fixedDelay = 60 * 1000)
@Scheduled(fixedDelay = 60 * 1000)
public void initAUserCoupon() {
        log.info("updateCoupon begin");
        userCouponService.initAUserCoupon();
        log.info("updateCoupon end");
    }
}
